# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gnome-doc-utils
pkgver=0.20.10
pkgrel=7
pkgdesc="Documentation utilities for Gnome"
url="https://www.gnome.org/"
arch="noarch"
license="GPL-2.0-or-later LGPL-2.1-or-later"
depends="python3 docbook-xml rarian py3-libxml2 libxslt"
makedepends="libxslt-dev libxml2-dev perl-xml-parser rarian-dev
	gettext-dev intltool"
subpackages="$pkgname-lang $pkgname-doc"
source="https://download.gnome.org/sources/gnome-doc-utils/${pkgver%.*}/gnome-doc-utils-$pkgver.tar.xz
	python3.patch
	"


prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-scrollkeeper \
		--enable-build-utils
	make
	sed -i s/python$/python3/g xml2po/xml2po/xml2po
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}
sha512sums="1cb5e3b9ca9e45e6c551801e9c9c4aac725c2ce85238c230a4c70b36c90419886b921d8dd464df0643fc3bbb877df075abaa83a36d1609c5664960c31e11d151  gnome-doc-utils-0.20.10.tar.xz
bc0093b589f8a6d2ef5cd83d4ca5cfe86281b0196963cb6d8dee0c54f915af1b5d05c64f62585f9360deb53cd60a313575db5eca976f4bc548a4e28535612c1d  python3.patch"
